package com.jinmdz.fmis.generator.model;

/**
 * ColumnInfo
 *
 * @author LiCongLu
 * @date 2019-12-13 14:17
 */
public class ColumnInfo implements Comparable<ColumnInfo> {

    /**
     * 表名
     */
    private String tableName;

    /**
     * 列名
     */
    private String columnName;

    /**
     * 数据类型
     */
    private String dataType;

    /**
     * 列类型
     */
    private String columnType;

    /**
     * 是否为空
     */
    private String isNullable;

    /**
     * 默认值
     */
    private String columnDefault;

    /**
     * 列序号
     */
    private int ordinalPosition;

    /**
     * 列注释
     */
    private String columnComment;

    public String getTableName() {
        return tableName;
    }

    public ColumnInfo setTableName(String tableName) {
        this.tableName = tableName;
        return this;
    }

    public String getColumnName() {
        return columnName;
    }

    public ColumnInfo setColumnName(String columnName) {
        this.columnName = columnName;
        return this;
    }

    public String getDataType() {
        return dataType;
    }

    public ColumnInfo setDataType(String dataType) {
        this.dataType = dataType;
        return this;
    }

    public String getColumnType() {
        return columnType;
    }

    public ColumnInfo setColumnType(String columnType) {
        this.columnType = columnType;
        return this;
    }

    public String getIsNullable() {
        return isNullable;
    }

    public ColumnInfo setIsNullable(String isNullable) {
        this.isNullable = isNullable;
        return this;
    }

    public String getColumnDefault() {
        return columnDefault;
    }

    public ColumnInfo setColumnDefault(String columnDefault) {
        this.columnDefault = columnDefault;
        return this;
    }

    public int getOrdinalPosition() {
        return ordinalPosition;
    }

    public ColumnInfo setOrdinalPosition(int ordinalPosition) {
        this.ordinalPosition = ordinalPosition;
        return this;
    }

    public String getColumnComment() {
        return columnComment;
    }

    public ColumnInfo setColumnComment(String columnComment) {
        this.columnComment = columnComment;
        return this;
    }

    @Override
    public int compareTo(ColumnInfo o) {
        return this.ordinalPosition - o.ordinalPosition;
    }
}
